# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DataMigration.V1.Model.OracleConnectionProfile do
  @moduledoc """
  Specifies connection parameters required specifically for Oracle databases.

  ## Attributes

  *   `databaseService` (*type:* `String.t`, *default:* `nil`) - Required. Database service for the Oracle connection.
  *   `forwardSshConnectivity` (*type:* `GoogleApi.DataMigration.V1.Model.ForwardSshTunnelConnectivity.t`, *default:* `nil`) - Forward SSH tunnel connectivity.
  *   `host` (*type:* `String.t`, *default:* `nil`) - Required. The IP or hostname of the source Oracle database.
  *   `oracleAsmConfig` (*type:* `GoogleApi.DataMigration.V1.Model.OracleAsmConfig.t`, *default:* `nil`) - Optional. Configuration for Oracle ASM connection.
  *   `password` (*type:* `String.t`, *default:* `nil`) - Required. Input only. The password for the user that Database Migration Service will be using to connect to the database. This field is not returned on request, and the value is encrypted when stored in Database Migration Service.
  *   `passwordSet` (*type:* `boolean()`, *default:* `nil`) - Output only. Indicates whether a new password is included in the request.
  *   `port` (*type:* `integer()`, *default:* `nil`) - Required. The network port of the source Oracle database.
  *   `privateConnectivity` (*type:* `GoogleApi.DataMigration.V1.Model.PrivateConnectivity.t`, *default:* `nil`) - Private connectivity.
  *   `ssl` (*type:* `GoogleApi.DataMigration.V1.Model.SslConfig.t`, *default:* `nil`) - SSL configuration for the connection to the source Oracle database. * Only `SERVER_ONLY` configuration is supported for Oracle SSL. * SSL is supported for Oracle versions 12 and above.
  *   `staticServiceIpConnectivity` (*type:* `GoogleApi.DataMigration.V1.Model.StaticServiceIpConnectivity.t`, *default:* `nil`) - Static Service IP connectivity.
  *   `username` (*type:* `String.t`, *default:* `nil`) - Required. The username that Database Migration Service will use to connect to the database. The value is encrypted when stored in Database Migration Service.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :databaseService => String.t() | nil,
          :forwardSshConnectivity =>
            GoogleApi.DataMigration.V1.Model.ForwardSshTunnelConnectivity.t() | nil,
          :host => String.t() | nil,
          :oracleAsmConfig => GoogleApi.DataMigration.V1.Model.OracleAsmConfig.t() | nil,
          :password => String.t() | nil,
          :passwordSet => boolean() | nil,
          :port => integer() | nil,
          :privateConnectivity => GoogleApi.DataMigration.V1.Model.PrivateConnectivity.t() | nil,
          :ssl => GoogleApi.DataMigration.V1.Model.SslConfig.t() | nil,
          :staticServiceIpConnectivity =>
            GoogleApi.DataMigration.V1.Model.StaticServiceIpConnectivity.t() | nil,
          :username => String.t() | nil
        }

  field(:databaseService)

  field(:forwardSshConnectivity, as: GoogleApi.DataMigration.V1.Model.ForwardSshTunnelConnectivity)

  field(:host)
  field(:oracleAsmConfig, as: GoogleApi.DataMigration.V1.Model.OracleAsmConfig)
  field(:password)
  field(:passwordSet)
  field(:port)
  field(:privateConnectivity, as: GoogleApi.DataMigration.V1.Model.PrivateConnectivity)
  field(:ssl, as: GoogleApi.DataMigration.V1.Model.SslConfig)

  field(:staticServiceIpConnectivity,
    as: GoogleApi.DataMigration.V1.Model.StaticServiceIpConnectivity
  )

  field(:username)
end

defimpl Poison.Decoder, for: GoogleApi.DataMigration.V1.Model.OracleConnectionProfile do
  def decode(value, options) do
    GoogleApi.DataMigration.V1.Model.OracleConnectionProfile.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DataMigration.V1.Model.OracleConnectionProfile do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
